Leadtools.Dicom.Scu Namespace > QueryRetrieveScu Class > Find Method : Find<TQuery,TResult>(DicomScp,TQuery,DicomMatchDelegate<TResult>) Method |
'Declaration Public Overloads Sub Find (Of TQuery,TResult)( _ ByVal Scp As DicomScp, _ ByVal Query As TQuery, _ ByVal OnMatch As DicomMatchDelegate(Of TResult) _ )
'Usage Dim instance As QueryRetrieveScu Dim Scp As DicomScp Dim Query As TQuery Dim OnMatch As DicomMatchDelegate(Of TResult) instance.Find(Of TQuery, TResult)(Scp, Query, OnMatch)
Public Sub FindMWL() DicomEngine.Startup() DicomNet.Startup() Dim query As New ModalityWorklistQuery() Dim scp As New DicomScp() Dim findMwl As New QueryRetrieveScu() scp.AETitle = "MWL_SERVER" scp.Port = 104 scp.Timeout = 60 scp.PeerAddress = IPAddress.Parse("192.168.0.209") findMwl.AETitle = "LEAD_CLIENT" findMwl.Find(Of ModalityWorklistQuery, ModalityWorklistResult)(scp, query, AddressOf FoundMatch) DicomEngine.Shutdown() DicomNet.Startup() End Sub Private Sub FoundMatch(ByVal result As ModalityWorklistResult, ByVal ds As DicomDataSet) Dim message As String = ((vbCr & vbLf & vbTab & "Accession #:" & vbTab & vbTab & " " & result.AccessionNumber & vbCr & vbLf & vbTab & "Patient Name:" & vbTab & vbTab) + result.PatientName.Full & vbCr & vbLf & vbTab & "Scheduled Start Date:" & vbTab) + result.ScheduledProcedureStepSequence(0).ScheduledProcedureStepStartDate.Value.ToShortDateString() Console.WriteLine(message) End Sub
public void FindMWL() { DicomEngine.Startup(); DicomNet.Startup(); ModalityWorklistQuery query = new ModalityWorklistQuery(); DicomScp scp = new DicomScp(); QueryRetrieveScu findMwl = new QueryRetrieveScu(); scp.AETitle = "MWL_SERVER"; scp.Port = 104; scp.Timeout = 60; scp.PeerAddress = IPAddress.Parse("192.168.0.209"); findMwl.AETitle = "LEAD_CLIENT"; findMwl.Find<ModalityWorklistQuery, ModalityWorklistResult>(scp, query, FoundMatch); DicomEngine.Shutdown(); DicomNet.Startup(); } private void FoundMatch(ModalityWorklistResult result, DicomDataSet ds) { string message = "\r\n\tAccession #:\t\t " + result.AccessionNumber + "\r\n\tPatient Name:\t\t" + result.PatientName.Full + "\r\n\tScheduled Start Date:\t" + result.ScheduledProcedureStepSequence[0].ScheduledProcedureStepStartDate.Value.ToShortDateString(); Console.WriteLine(message); }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2